cmake_minimum_required(VERSION 3.16)
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 14)
endif()
project(trdp_demo)

set(TRDPMINI_INC_DIR /usr/include/trdpmini)
set(TRDPMINI_LIB_DIR /usr/lib/trdpmini)

include_directories(${TRDPMINI_INC_DIR})

find_library(pthread libpthread.so REQUIRED)
find_library(trdpmini libtrdpmini.a HINTS ${TRDPMINI_LIB_DIR})

add_executable(demo_pub demo_pub.cpp trdp.cpp)
add_executable(demo_sub demo_sub.cpp trdp.cpp)

target_link_libraries(demo_pub
	${trdpmini}
	${pthread}
)

target_link_libraries(demo_sub
	${trdpmini}
	${pthread}
)
